package com.money.service;

import com.money.entity.CbbOrderEntity;
import com.money.entity.CbbShoppingCartEntity;
import com.money.entity.CddShopEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "rapid-rearend") //value:服务命的提供者的服务名在nacos上的  fallback就是自定义的异常的类
public interface RapIdRearendService {

    /**
     * 修改
     */
    @PostMapping("/object/frontend/shoppingcart/update")
    public boolean update(@RequestBody CbbShoppingCartEntity shoppingCartEntity);

    @GetMapping("/object/frontend/shoppingcart/info/{caId}")
    public CbbShoppingCartEntity info(@PathVariable("caId") Integer caId);

    @RequestMapping("/object/frontend/shoppingcart/delete")
    public void delete(@RequestBody Integer[] scIds);

    @RequestMapping("/object/frontend/shop/infoId/{spId}")
    public CddShopEntity infoId(@PathVariable("spId") Long spId);

    /**
     * 保存
     */
    @RequestMapping("/object/frontend/order/save/saveOrder")
    public boolean saveOrder(@RequestBody CbbOrderEntity cbbOrder);
}
